﻿@model OMS.Models.CreateUser
@{
    ViewBag.Title = "Edit User";

}



<div class="panel-text">
<h2>Edit User</h2>
    This age is appointed for creating new user for particular role
    </div>
@using (Html.BeginForm(new { ReturnUrl = ViewBag.ReturnUrl })) {
    
        @Html.AntiForgeryToken()
        @Html.ValidationSummary(true)

       
        

        
        <table class="create-user-table">
            <tr>
                <td>@Html.LabelFor(m => m.LoginName)</td>
                <td>@Html.TextBoxFor(m => m.LoginName)</td>
                <td>@Html.ValidationMessageFor(m => m.LoginName)</td>
                
            </tr>

            <tr>
                <td>@Html.LabelFor(m => m.FirstName)</td>
                <td>@Html.TextBoxFor(m => m.FirstName)</td>
                <td>@Html.ValidationMessageFor(m => m.FirstName)</td>
  
            </tr>
             <tr>
                <td>@Html.LabelFor(m => m.LastName)</td>
                <td>@Html.TextBoxFor(m => m.LastName)</td>
                <td>@Html.ValidationMessageFor(m => m.LastName)</td>
            </tr>
            <tr>
                <td>@Html.LabelFor(m => m.Password)</td>
                <td>@Html.PasswordFor(m => m.Password, new { value = Model.Password})</td>
                <td>@Html.ValidationMessageFor(m => m.Password)</td>
            </tr>
            <tr>
                <td>Confirm Password</td>
                <td>@Html.PasswordFor(m => m.PasswordConfirm, new { value = Model.Password})</td>
                <td>@Html.ValidationMessageFor(m => m.PasswordConfirm)</td>
            </tr>
            <tr>
                <td>@Html.LabelFor(m => m.Email)</td>
                <td>@Html.TextBoxFor(m => m.Email)</td>
                <td>@Html.ValidationMessageFor(m => m.Email)</td>
            </tr>
            <tr>
                <td>Region</td>
                <td>@Html.DropDownListFor(m => m.Region, new SelectList(new string[] { "North", "South", "West", "East" }), new { @id="drop-down-list-role" })</td>
                <td>@Html.ValidationMessageFor(m => m.Region)</td>
            </tr>
            <tr>
                <td>Role</td>
                <td> 
                    @Html.RadioButtonFor(m=>m.Role,4) Customer<br />
                    @Html.RadioButtonFor(m=>m.Role,1) Administrator<br />
                    @Html.RadioButtonFor(m=>m.Role,3) Merchandiser<br />
                    @Html.RadioButtonFor(m=>m.Role,2) Supervisor<br />
                </td>
                <td>@Html.ValidationMessageFor(m => m.Role)</td>
            </tr>
        </table>
        <div style="margin-left:80px;">
                <button type="submit" name="action" value="Create" class="buttons-blue">Save</button>
                <button type="button" name="action" onclick="location.href='Index'" class="buttons-red">Cancel</button>
                <button type="reset" name="action" value="Refresh" class="buttons-yellow">Refresh</button>
            </div>
        <br />
        <br />
}
